Skip to content

Update peer dependency for reanimated to allow the use of reanimated v4 #2223

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

skusnierz
Copy link
Contributor

Motivation

Currently, running an application that uses react-native-bottom-sheet along with reanimated v4 causes a warning to be displayed :

The following packages should be updated for best compatibility with the installed expo version:
  [email protected] - expected version: ~3.16.1
Your project may not work correctly until you install the expected versions of the packages.

The following changes will cause this warning not to be displayed, I tested with the example that is in the repository and everything works fine

@@ -65,7 +65,7 @@
"react": "*",
"react-native": "*",
"react-native-gesture-handler": ">=2.16.1",
"react-native-reanimated": ">=3.16.0"
"react-native-reanimated": ">=3.16.0 || >=4.0.0-"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fyi: this - at the end is not typo, it is about beta version coverage e.g. 4.0.0-beta.3

Copy link

github-actions bot commented May 3, 2025

This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@tomekzaw
Copy link
Contributor

@gorhom Can we please re-open this PR?

@tomekzaw
Copy link
Contributor

tomekzaw commented Jul 5, 2025

We will also need to replace all useWorkletCallback calls with useCallback(() => { 'worklet'; }) because useWorkletCallback has been removed in Reanimated v4.

edit: Done in #2356

@gorhom gorhom reopened this Jul 27, 2025
@gorhom
Copy link
Owner

gorhom commented Jul 27, 2025

thanks @skusnierz for submitting this PR

@gorhom gorhom merged commit 7b471f9 into gorhom:master Jul 27, 2025
@lucaswitch
Copy link

lucaswitch commented Jul 28, 2025

We will also need to replace all useWorkletCallback calls with useCallback(() => { 'worklet'; }) because useWorkletCallback has been removed in Reanimated v4.

Screen.Recording.2025-07-25.at.17.36.08.mov

edit: Done in #2356

Also the example app is not quite working with reanimated v4. I'm not sure if this should be reported to reanimated or this repo cause it works fine on v3. It seems like a behavior change not reported on migration guide between v3 and v4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants